<%@page language="java" contentType="text/html;charset=utf-8"%>
<%--<%@page import="news.beans.News"%>--%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<section>
  <h1>站内检索</h1>
  <hr/>
  <form action="news" method="get" id="formQ">
    <input type="hidden" name="action" value="query"/>
    <input type="text" placeholder="请输入关键字" name="keyword"/>
    <img id="submitBtn" style="cursor: pointer;"
         onclick="submitFun()" name="submitBtn" src="${pageContext.request.contextPath}/image/ss.jpg"/>
  </form>
</section>

<section>
  <h1>热点</h1>
  <hr/>
  <ul>
    <c:forEach items="${requestScope.newsList}" var="news">
      <li>
        .<a href="dispNews.jsp?id=${news.id}">
          ${news.title}
      </a>
      </li>
    </c:forEach>

  </ul>
</section>
<section>
  <h1>最新评论</h1>
  <hr/>
  <ul>
    <c:forEach items="${requestScope.newComment}" var="comment">
      <li>
        .<a href="dispNews.jsp?id=${comment.newsid}">
          ${comment.comment}
      </a>
      </li>
    </c:forEach>
  </ul>
</section>